/*
本系统的数据的储存通过IO流实现本地的文件的信息保存
* */
package com.baidu.Service.impl;
import com.baidu.Service.StudentService;
import com.baidu.dao.StudentDao;
import com.baidu.dao.impl.StudentDaoImpl;
import com.baidu.domain.Student;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;

public class StudentServiceImpl implements StudentService {
    //创建Dao层对象
    StudentDao sd = new StudentDaoImpl();
    @Override
    public boolean addStudent(Student stu) throws IOException {
        boolean result = sd.add(stu);
        return  result;
    }
//获取集合数据
    @Override
    public ArrayList<Student> findStudent() {
        ArrayList<Student> list = sd.find();
        return list;
    }


}
